﻿// <com.woyouqiu.Copyright>
// --------------------------------------------------------------
// <copyright>上海有求网络科技有限公司 2015</copyright>
// <Solution>MyCompany.MyProject</Solution>
// <Project>MyCompany.MyProject.Core</Project>
// <FileName>City.cs</FileName>
// <CreateTime>2017-04-22 16:04</CreateTime>
// <Author>何苗</Author>
// <Email>hemiao@woyouqiu.com</Email>
// <log date="2017-04-22 16:04" version="00001">创建</log>
// --------------------------------------------------------------
// </com.woyouqiu.Copyright>

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities.Auditing;

namespace Vecen.BangChuang.BangChuang.Areas {
    [Table("Cities")]
    public sealed class City : CreationAuditedEntity<long>
    {
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public override long Id { get; set; }

        [StringLength(50)]
        public string Name { get; set; }

        public long? ParentId { get; set; }

        [StringLength(500)]
        public string FullName { get; set; }

        [ForeignKey("ParentId")]
        public City Parent { get; set; }

        [StringLength(32)]
        public string Type { get; set; }
    }
}